Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsp: Handle case where a rego file is empty #602

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Conversation

charlieegan3
Copy link
Member

This ensures that an error is shown when the parsing fails because the file is empty.

In this case, the astError is a single error rather than a slice.

We should add a new opa-errors entry for empty module.

This ensures that an error is shown when the parsing fails
because the file is empty.

In this case, the astError is a single error rather than a
slice.

We should add a new opa-errors entry for empty module.

Signed-off-by: Charlie Egan <charlie@styra.com>
@anderseknert anderseknert merged commit 4f559f2 into main Mar 14, 2024
3 checks passed
@anderseknert anderseknert deleted the fix-empty-file-case branch March 14, 2024 15:26
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
This ensures that an error is shown when the parsing fails
because the file is empty.

In this case, the astError is a single error rather than a
slice.

We should add a new opa-errors entry for empty module.

Signed-off-by: Charlie Egan <charlie@styra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants